package com.smart.client.core.client;

import javax.annotation.PreDestroy;
import java.io.Serializable;

/**
 * Created By Li Jiaxi
 * <br/>Date: 2023/4/12 11:32
 * <br/>Description:
 */
public interface IClient extends Serializable {

    /**
     * 主启动程序，初始化参数
     *
     * @throws Exception 初始化异常
     */
    void start() throws Exception;

    /**
     * 进行重连操作
     *
     * @throws Exception 初始化异常
     */
    void reconnect() throws Exception;

    /**
     * 优雅的结束服务器
     *
     * @throws InterruptedException 提前中断异常
     */
    @PreDestroy
    void destroy() throws InterruptedException;
}
